//
//  PageCell.h
//  NVAReader
//
//  Created by DuyLK on 6/15/14.
//  Copyright (c) 2014 com.nva.nvareader. All rights reserved.
//

#import <Foundation/Foundation.h>
#include "mupdf/fitz.h"
#import "PXListViewCell.h"
#import "ListPageDelegate.h"
#import "HitView.h"
#import "SelectTextView.h"
#import "NVAAnnotation.h"
#import "EvenDelegate.h"
@interface PageCell : PXListViewCell<EvenDelegate>
{
	NSString *_title;
    NSImage *_image;
    //use for hightlign
    CGRect hitRects[500];
    SelectTextView *selectText;
    
    fz_display_list *page_list;
	fz_display_list *annot_list;
    fz_page *page;
    int number;
    CGSize pageSize;
    fz_pixmap *image_pix;
    CGDataProviderRef imageData;
    NSArray *annotations;
}
@property (copy) NSMutableDictionary *searchData;
@property (copy) HitView *hitView;
@property (copy) SelectTextView *selectText;
@property (nonatomic, strong) id<ListPageDelegate> delegate;
@property (copy) NSString *title;
@property (copy) NSImage *image;
@property fz_document *doc;
@property int widthPage;
@property int heightPage;
@property BOOL isZoom;
@property BOOL isSelect;
@property BOOL isDraw;
-(void) addTextSelectView:(BOOL) add;
-(void) changeWidthHeight:(int)widthPage height:(int)heightPage;
-(void) addSelectText;
- (void) textSelectModeOff;
-(void) saveSelectionAsMarkup:(int)type;
-(void) update;
- (void) loadAnnotations;
- (void) setIsDrawTool:(BOOL)isDraw;
@end
